<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%medias}}".
 *
 * @property integer $id
 * @property string $class_name
 * @property integer $object_id
 * @property string $file_path
 * @property string $alt
 * @property integer $is_default
 * @property integer $created_at
 * @property integer $updated_at
 */
class Medias extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%medias}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['object_id', 'is_default', 'created_at', 'updated_at'], 'integer'],
            [['alt'], 'string'],
            [['class_name', 'file_path'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自增id'),
            'class_name' => Yii::t('zhtfrontend', '类名'),
            'object_id' => Yii::t('zhtfrontend', '对象id'),
            'file_path' => Yii::t('zhtfrontend', '文件路径'),
            'alt' => Yii::t('zhtfrontend', '描述'),
            'is_default' => Yii::t('zhtfrontend', '是否是默认图'),
            'created_at' => Yii::t('zhtfrontend', '创建时间'),
            'updated_at' => Yii::t('zhtfrontend', '修改时间'),
        ];
    }
}
